/**
 * $Id: ResultInfo.java 2 2011-09-03 10:16:43Z adriftrock@gmail.com $
 */

package com.swehr.model;

import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author Rock Huang
 * @version 0.1
 */
@XmlRootElement
public class ResultInfo {
    private boolean success;
    private String message;

    public ResultInfo() {}

    public ResultInfo(boolean success, String message) {
        this.success = success;
        this.message = message;
    }

    public boolean isSuccess() {
        return success;
    }

    public void setSuccess(boolean success) {
        this.success = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer();
        sb.append("{'success':'").append(success);
        sb.append("', 'message':'").append(message);
        sb.append("'}");
        return sb.toString();
    }

}
